﻿@page "/admin/dict"
@attribute [Authorize]
@attribute [RolePermission]
@inherits ComponentDefault
@using ThingsGateway.Admin.Application
@namespace ThingsGateway.Admin.Razor

<div class="h-100">
    <AdminTable TItem="SysDict"
                AutoGenerateColumns="true"
                ShowSearchButton=false
                ShowDefaultButtons=true
                AllowResizing="true"
                IsFixedHeader=true
                IsMultipleSelect=true
                SearchModel=SearchModel
                EditDialogSize="Size.Large"
                ShowSearch=false
                ShowExtendButtons=true
                OnQueryAsync="OnQueryAsync"
                IsPagination=true
                OnSaveAsync="SaveDictAsync"
                OnDeleteAsync="@(a=>DeleteDictAsync(a.Select(a=>a.Id)))">

        <TableColumns>
            <TableColumn @bind-Field="@context.SortCode">
                <EditTemplate Context="sortCode">

                    <SysDictSortCodeEdit Model="sortCode"></SysDictSortCodeEdit>
                </EditTemplate>
            </TableColumn>
        </TableColumns>
    </AdminTable>
</div>
